<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title }}</title>
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <div class="container">
        <header>
            <h1>后台管理系统</h1>
        </header>
        
        <main>
            <div class="backend-dashboard">
                <!-- 侧边栏导航 -->
                <aside class="sidebar">
                    <nav>
                        <ul>
                            <li><a href="{% url 'backend:dashboard' %}" class="active">仪表板</a></li>
                            <li><a href="#">用户管理</a></li>
                            <li><a href="#">商品管理</a></li>
                            <li><a href="#">库存管理</a></li>
                            <li><a href="#">订单管理</a></li>
                            <li><a href="{% url 'backend:cashier_settings' %}">收银台设置</a></li>
                            <li><a href="#">销售报表</a></li>
                            <li><a href="#">系统设置</a></li>
                        </ul>
                    </nav>
                </aside>
                
                <!-- 主要内容区域 -->
                <div class="dashboard-content">
                    <h2>系统概览</h2>
                    
                    <!-- 数据卡片区 -->
                    <div class="stats-cards">
                        <div class="stat-card">
                            <div class="stat-number">¥12,345</div>
                            <div class="stat-label">今日销售额</div>
                        </div>
                        
                        <div class="stat-card">
                            <div class="stat-number">156</div>
                            <div class="stat-label">今日订单数</div>
                        </div>
                        
                        <div class="stat-card">
                            <div class="stat-number">45</div>
                            <div class="stat-label">活跃用户</div>
                        </div>
                        
                        <div class="stat-card">
                            <div class="stat-number">850</div>
                            <div class="stat-label">商品总数</div>
                        </div>
                    </div>
                    
                    <!-- 最近订单表格 -->
                    <div class="recent-orders">
                        <h3>最近订单</h3>
                        <table>
                            <thead>
                                <tr>
                                    <th>订单编号</th>
                                    <th>客户</th>
                                    <th>金额</th>
                                    <th>状态</th>
                                    <th>时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>ORD-2025-001</td>
                                    <td>张三</td>
                                    <td>¥256.00</td>
                                    <td><span class="status completed">已完成</span></td>
                                    <td>2025-09-12 15:30</td>
                                    <td><a href="#" class="btn btn-small">查看</a></td>
                                </tr>
                                <tr>
                                    <td>ORD-2025-002</td>
                                    <td>李四</td>
                                    <td>¥189.50</td>
                                    <td><span class="status completed">已完成</span></td>
                                    <td>2025-09-12 14:45</td>
                                    <td><a href="#" class="btn btn-small">查看</a></td>
                                </tr>
                                <tr>
                                    <td>ORD-2025-003</td>
                                    <td>王五</td>
                                    <td>¥320.00</td>
                                    <td><span class="status pending">处理中</span></td>
                                    <td>2025-09-12 13:20</td>
                                    <td><a href="#" class="btn btn-small">查看</a></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </main>
        
        <footer>
            <p>&copy; 2025 超市管理系统 - 后台管理</p>
        </footer>
    </div>
    
    <script src="/static/js/main.js"></script>
    <style>
        /* 后台管理特定样式 */
        .backend-dashboard {
            display: flex;
            gap: 30px;
        }
        
        .sidebar {
            flex: 0 0 200px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            padding: 20px 0;
        }
        
        .sidebar nav ul {
            list-style-type: none;
        }
        
        .sidebar nav ul li {
            margin-bottom: 5px;
        }
        
        .sidebar nav ul li a {
            display: block;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            transition: background-color 0.3s;
        }
        
        .sidebar nav ul li a:hover {
            background-color: #f0f0f0;
        }
        
        .sidebar nav ul li a.active {
            background-color: #4CAF50;
            color: white;
        }
        
        .dashboard-content {
            flex: 1;
        }
        
        .dashboard-content h2 {
            margin-bottom: 30px;
            color: #333;
        }
        
        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }
        
        .stat-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            padding: 20px;
            text-align: center;
        }
        
        .stat-number {
            font-size: 32px;
            font-weight: bold;
            color: #4CAF50;
            margin-bottom: 10px;
        }
        
        .stat-label {
            color: #666;
            font-size: 16px;
        }
        
        .recent-orders {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            padding: 20px;
        }
        
        .recent-orders h3 {
            margin-bottom: 20px;
            color: #333;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }
        
        th {
            background-color: #f8f9fa;
            font-weight: bold;
            color: #333;
        }
        
        .status {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: bold;
        }
        
        .status.completed {
            background-color: #d4edda;
            color: #155724;
        }
        
        .status.pending {
            background-color: #fff3cd;
            color: #856404;
        }
        
        .btn-small {
            padding: 5px 10px;
            font-size: 14px;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .backend-dashboard {
                flex-direction: column;
            }
            
            .sidebar {
                flex: 1;
            }
            
            .stats-cards {
                grid-template-columns: 1fr;
            }
        }
    </style>
</body>
</html>